Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Spooling Messages


GXCreateSpoolFile

QuickDraw GX sends the GXCreateSpoolFile message at the start of spooling a document. You can override the GXCreateSpoolFile message to perform the setup for spool files. Your override of the GXCreateSpoolFile message must match the following formal declaration:

OSErr MyCreateSpoolFile (FSSpecPtr aFSSpecPtr,
                     long createOptions, gxSpoolFile *aSpoolFile);
aFSSpecPtr
A pointer to a file specification that indicates where the spool file is created.
createOptions
Options for creating the spool file, as shown in Table 4-5.
aSpoolFile
A pointer to a file specification, which on return is a value that references the newly created spool file.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
QuickDraw GX sends the GXCreateSpoolFile message at the start of spooling, when an application calls the GXStartJob function to create a new spool file. Several options for creating the file may be specified by QuickDraw GX, as shown in Table 4-5.
Options for the GXCreateSpoolFile message
ConstantValueExplanation
gxNoCreateOptions0x00000000No options for this file: just create it.
gxInhibitAlias0x00000001Do not create an alias for this file in the Print Monitor Documents (PMD) folder.
gxInhibitUniqueName0x00000002Do not append anything to the filename to make it unique. If you specify this option and the file already exists, the file is replaced.
gxResolveBitmapAlias0x00000004Include bitmap data instead of the alias for the bitmap data.

If you override the GXCreateSpoolFile message, you can perform any setup you wish. You can override this message to change the location of the spool file by changing the contents of the aFSSpecPtr parameter. You can also override this message and all subsequent spooling messages if you want to do all your own spooling. The code in your override of this message is executed once per spooled job.

SPECIAL CONSIDERATIONS
You rarely send the GXCreateSpoolFile message yourself.

If you are providing your own spooling, you need to totally override the GXCreateSpoolFile message and all of the other spooling and despooling messages.

If you are not providing your own spooling (which is almost always the case), you must forward the GXCreateSpoolFile message because QuickDraw GX's default implementation creates a new spool file that is used by the other spooling messages.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
SEE ALSO
The GXStartJob function is described in Inside Macintosh: QuickDraw GX Printing.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help